package util;

import java.sql.Connection;
import java.sql.DriverManager;

public class Java_to_MySql {
    static final String JDBC_DRIVER = "com.mysql.cj.jdbc.Driver";
    static final String DB_URL = "jdbc:mysql://172.17.3.199:3309/tour";
    static final  String USER = "root";
    static final  String PASS = "123";

    static Connection connection=null;
    public static void main(String[] args) {

    }
    public Connection con() {
        try {
            Class.forName(JDBC_DRIVER);
            connection = DriverManager.getConnection(DB_URL, USER, PASS);
        } catch (Exception e1) {
            e1.printStackTrace();
        }
        return connection;
    }
}
